<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  
  <table>
    <thead>
      <tr>
        <th>姓名</th>
        <th>年龄</th>
        <th>身高</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td>why</td>
        <td>18</td>
        <td>1.88</td>
      </tr>
      <tr>
        <td>kobe</td>
        <td>30</td>
        <td>2.1</td>
      </tr>
    </tbody>
  </table>

  <script>
    var tableEl = document.body.firstElementChild
    // 通过table元素获取内部的后代元素
    console.log(tableEl.tHead,tableEl.tBodies,tableEl.tFoot)
    console.log(tableEl.rows)

    
  </script>
</body>
</html>